/**************************************************************************/
/*                                                                        */
/* Copyright (c) Sinoembed Technology Co.,Ltd.           */
/*  */
/*                                                                        */
/*                                                                        */
/*    created:    2012-6-27                                             */ 
/*    filename:   CSinoembedPuzzleWnd.h                                          */ 
/*    author:     Derek Huang                                                  */  
/*    purpose:                                                            */ 
/*                                                                        */
/* ************************************************************************/

#ifndef __CE_SETTING_WND_H__
#define __CE_SETTING_WND_H__
#include <mzfc_inc.h>
//#include "iUiButton.h"
#include "UiSetTopBar.h"
#include "UiSetSwitchWnd.h"
#include "UiDisplayWnd.h"
#include "UiControlWnd.h"
#include "UiCommonWnd.h"
#include "UiSystemWnd.h"
#include "TBInvokeInterface.h"

typedef enum _tagSettingWndDisplay
{
	SETTING_TOPBAR_WND = 0,
	SETTING_SWITCH_WND,
	SETTING_DISPLAY_WND,
	SETTING_CONTROL_WND,
	BSETTING_COMMON_WND,
	SETTING_SYSTEM_WND,
	MAX_SETTING_WND,
} SETTING_WND;

class CSettingWnd : public CMzWndEx
{
	MZ_DECLARE_DYNAMIC(CSettingWnd);
public:
	CSettingWnd();
	virtual ~CSettingWnd();
	virtual void PaintWin(HDC hdc, RECT* prcUpdate /* = NULL */);
	virtual BOOL OnInitDialog();
	virtual  void OnMzCommand(WPARAM wParam, LPARAM lParam);
	virtual LRESULT MzDefWndProc(UINT message, WPARAM wParam, LPARAM lParam);
	void AnimateWindowEx_In( UINT nAnimType, bool bShow );
	void AnimateWindowEx_Out( UINT nAnimType, bool bShow );
	void DestroyWindow();
	virtual void DeleteImages();
	virtual void OnLButtonDown(UINT fwKeys, int xPos, int yPos);
private:

public:
#ifdef MERGER_APP_TO_SHELL
	BOOL Create();
#endif
	BOOL InitBackgrandImages();
	void LoadiInterItem();
	void OnExit();
	void OnMenu();
	void ShowMainWnd(BOOL bShow);
	void ShowOnlyWnd(UINT nWndIndex);
	void PostMessage2App4Source();
	static void APP_ComSystem_CbkFunc(PROTOCAL_INFO, BYTE);
	static void APP_Setup_CbkFunc(PROTOCAL_INFO, BYTE);

public:
	HDC				m_hBakDC;
	ImagingHelper	*m_BTMainBG;
	HBITMAP			m_hBitmapBakDC;
public:
	UiWin		m_uiWin;
	UiSetTopBar	m_uiTopBar;
	UiSetSwitchWnd	m_uiSwitchWnd;
	UiDisplayWnd	m_uiDisplayWnd;
	UiCommonWnd		m_uiCommonWnd;
	UiControlWnd	m_uiControlWnd;
	UiSystemWnd		m_uiSystemWnd;
public:
	void UpdateDisplayLight(PROTOCAL_INFO ProtocalInfo, BYTE bFlag);
	void UpdateDisplayContrast(PROTOCAL_INFO ProtocalInfo, BYTE bFlag);
	void UpdateControl(PROTOCAL_INFO ProtocalInfo, BYTE bFlag);
	void UpdateCommon(PROTOCAL_INFO ProtocalInfo, BYTE bFlag);

	BOOL ReloadBkgnd();

};


#endif
